﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;
using Lib.Bases;
using Lib.Utils;

namespace MS.INV.Costs
{
    public partial class ChiPhi : Lib.Bases.Forms.FBaseSearch
    {
        public ChiPhi()
            : base(new SysObj.Cp_HoatDong(), "", "")
        {
            InitializeComponent();
        }

        private void ChiPhi_Load(object sender, EventArgs e)
        {
            Reload();
        }

        public override void ShowDetail(DataRow Row)
        {
            int ID = (!object.Equals(Row, null)) ? Lib.Utils.Cvert.ToInt32(Row["IdChiPhi"], 0) : 0;
            ChiPhi_New ff = new ChiPhi_New(ID);
            ff.StartPosition = FormStartPosition.CenterScreen;
            ff.ShowDialog();
            if (ff.SaveChanged)
            {
                Reload();
            }
        }
    }
}
